package edu.nf.takeoutdemo.mapper;

import com.github.pagehelper.Page;
import edu.nf.takeoutdemo.commons.annotation.AutoFill;
import edu.nf.takeoutdemo.commons.base.BaseMapper;
import edu.nf.takeoutdemo.commons.enumeration.OperationType;
import edu.nf.takeoutdemo.model.dto.CategoryPageQueryDTO;
import edu.nf.takeoutdemo.model.entity.Category;

import java.util.List;

/**
 *
 * @author zjl
 * @date 2025/10/25
 */
public interface CategoryMapper extends BaseMapper<Category> {
    List<Category> list(Integer type);

    Page<Category> pageQuery(CategoryPageQueryDTO categoryPageQueryDTO);

    @AutoFill(value= OperationType.INSERT)
    @Override
    void add(Category category);

    @AutoFill(value= OperationType.UPDATE)
    @Override
    void update(Category category);

    List<Category> categoryAllList();
}
